/*-------------------------------------------------------------------------
 *
 * rusagestub.h
 *	  getrusage(3) 的存根。
 *
 *
 * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 * src/include/rusagestub.h
 *
 *-------------------------------------------------------------------------
 */
#ifndef RUSAGESTUB_H
#define RUSAGESTUB_H

#include <sys/time.h>			/* 适用于 struct timeval */
#ifndef WIN32
#include <sys/times.h>			/* 适用于 struct tms */
#endif
#include <limits.h>				/* 适用于 CLK_TCK */

#define RUSAGE_SELF		0
#define RUSAGE_CHILDREN (-1)

struct rusage
{
	struct timeval ru_utime;	/* 用户时间使用 */
	struct timeval ru_stime;	/* 系统时间使用 */
};

extern int	getrusage(int who, struct rusage *rusage);

#endif							/* RUSAGESTUB_H */
